home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
castools.zip
/
FUNC5H.ASM
< prev
next >
Wrap
Assembly Source File
|
1989-08-10
|
2KB
|
44 lines
Include multi.inc
Include model.inc
;==============================================================================
;
; CAS function 05h -- Find First Entry in Queue
;
; Format:
; int CASFindFirst (int status, BYTE direction, BYTE queue)
; Input:
; Status of event, direction to search, queue to search
; Output:
; Returns event handle or negative error code
;==============================================================================
.CODE
CASFindFirst PROC arg1:WORD, arg2:BYTE, arg3:BYTE
push bx ; save registers
push cx
push dx
mov ax,MUX ; load multiplex number
mov ah,al ; move into ah
mov al,05h ; CAS function 5
mov cx,arg1 ; event status
mov dh,arg2 ; direction to search
mov dl,arg3 ; queue to search
int 2Fh
cmp ax,0 ; ax = 0?
jne FINISH ; find first failed, return err. code
mov ax,bx ; move event handle to ax
FINISH:
pop dx ; restore registers
pop cx
pop bx
ret
CASFindFirst endp
END